<template>
  <div class="Inbox">
    <div class="title">
      <span></span>
      <span>收件详情</span>
    </div>
    <div class="myStyle">
      <span class="theme">主题： {{data.sendTitle}}</span>
      <div class="who">
        <div>
          <b>收件人：</b>
          <span>{{data.reciverName}}</span>
        </div>
        <div class="border-P">
          <b>时间：</b>
          <span>{{data.sendTime}}</span>
        </div>
      </div>
      <div class="content">正文：{{data.sendContent}}</div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: ""
    };
  },
  created() {
    this.$route.params.id == 0 || this.$route.params.id
      ? localStorage.setItem("id", this.$route.params.id)
      : "";
    u.receiptDetail(
      {
        type: 1,
        id: Number(this.$route.params.id || localStorage.getItem("id"))
      },
      data => {
        if (data.code == 200) {
          this.data = data.data;
          u.unreadNum({}, data => {
            if (data.code == 200) {
              this.$store.commit("setuserNum", data.data);
            }
          });
        }
      }
    );
  },
  methods: {
    // onCopy () {
    // }
  }
};
</script>

<style lang="less" scoped>
.Inbox {
  height: 100%;
  background: white;
  .title {
    height: 50px;
    line-height: 50px;
    font-size: 16px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 1px solid #f4f5f6;
    span:nth-child(1) {
      margin: 0px 10px 0px 20px;
      margin-left: 20px;
      line-height: 50px;
      background: #ffb001;
      width: 5px;
      height: 18px;
      display: inline-block;
    }
  }
  .myStyle {
    margin-top: 32px;
    padding-left: 30px;
    font-size: 14px;
    .theme {
      font-size: 20px;
    }
    .who {
      margin: 18px 0px 30px 0px;
      display: flex;
      .border-P {
        margin-left: 90px;
      }
      span {
        color: #30383e;
      }
    }
  }
  .content {
    padding: 0px 30px 0px 0px;
    line-height: 2;
  }
}
</style>
